using EPiServer.Community.Blog;
using System;
using EPiServer.Common;

namespace EPiAbstractions.Community.Blog 
{
	public class BlogHandlerFacade : IBlogHandlerFacade
	{
		public event EPiServerCommonEventHandler BlogAdded;
		public event EPiServerCommonEventHandler BlogAddedActive;
		public event EPiServerCommonEventHandler BlogAddedNotActive;
		public event EPiServerCommonEventHandler BlogUpdated;
		public event EPiServerCommonEventHandler BlogRemoved;
		public event EPiServerCommonEventHandler EntryAdded;
		public event EPiServerCommonEventHandler EntryUpdated;
		public event EPiServerCommonEventHandler EntryRemoved;
		public event EPiServerCommonEventHandler BlogRead;
		public event EPiServerCommonEventHandler EntryCommentAdded;
		public event EPiServerCommonEventHandler EntryCommentUpdated;
		public event EPiServerCommonEventHandler EntryCommentRemoved;

		public BlogHandlerFacade()
		{
			BlogHandler.BlogAdded += OnBlogAdded;
			BlogHandler.BlogAddedActive += OnBlogAddedActive;
			BlogHandler.BlogAddedNotActive += OnBlogAddedNotActive;
			BlogHandler.BlogUpdated += OnBlogUpdated;
			BlogHandler.BlogRemoved += OnBlogRemoved;
			BlogHandler.EntryAdded += OnEntryAdded;
			BlogHandler.EntryUpdated += OnEntryUpdated;
			BlogHandler.EntryRemoved += OnEntryRemoved;
			BlogHandler.BlogRead += OnBlogRead;
			BlogHandler.EntryCommentAdded += OnEntryCommentAdded;
			BlogHandler.EntryCommentUpdated += OnEntryCommentUpdated;
			BlogHandler.EntryCommentRemoved += OnEntryCommentRemoved;
		}

		public virtual void OnBlogAdded(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogAdded != null)
				BlogAdded(sender, e);
		}

		public virtual void OnBlogAddedActive(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogAddedActive != null)
				BlogAddedActive(sender, e);
		}

		public virtual void OnBlogAddedNotActive(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogAddedNotActive != null)
				BlogAddedNotActive(sender, e);
		}

		public virtual void OnBlogUpdated(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogUpdated != null)
				BlogUpdated(sender, e);
		}

		public virtual void OnBlogRemoved(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogRemoved != null)
				BlogRemoved(sender, e);
		}

		public virtual void OnEntryAdded(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryAdded != null)
				EntryAdded(sender, e);
		}

		public virtual void OnEntryUpdated(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryUpdated != null)
				EntryUpdated(sender, e);
		}

		public virtual void OnEntryRemoved(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryRemoved != null)
				EntryRemoved(sender, e);
		}

		public virtual void OnBlogRead(String sender, EPiServerCommonEventArgs e)
		{
			if(BlogRead != null)
				BlogRead(sender, e);
		}

		public virtual void OnEntryCommentAdded(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryCommentAdded != null)
				EntryCommentAdded(sender, e);
		}

		public virtual void OnEntryCommentUpdated(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryCommentUpdated != null)
				EntryCommentUpdated(sender, e);
		}

		public virtual void OnEntryCommentRemoved(String sender, EPiServerCommonEventArgs e)
		{
			if(EntryCommentRemoved != null)
				EntryCommentRemoved(sender, e);
		}

		public virtual EPiServer.Community.Blog.Blog GetBlog(System.Int32 id)
		{
			 return BlogHandler.GetBlog(id);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(siteNullAction, page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(siteNullAction, page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.SiteCollection sites, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(sites, page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.SiteCollection sites, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(sites, page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.SiteCollection sites, EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(sites, siteNullAction, page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Common.SiteCollection sites, EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(sites, siteNullAction, page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Community.Blog.BlogType blogType, EPiServer.Common.SiteCollection sites, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(blogType, sites, page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Community.Blog.BlogType blogType, EPiServer.Common.SiteCollection sites, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(blogType, sites, page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Community.Blog.BlogType blogType, EPiServer.Common.SiteCollection sites, EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(blogType, sites, siteNullAction, page, pageSize, order);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetBlogs(EPiServer.Community.Blog.BlogType blogType, EPiServer.Common.SiteCollection sites, EPiServer.Common.Queries.NullValueAction siteNullAction, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.BlogSortOrder[] order)
		{
			 return BlogHandler.GetBlogs(blogType, sites, siteNullAction, page, pageSize, out totalItems, order);
		}

		public virtual EPiServer.Community.Blog.Blog AddBlog(EPiServer.Community.Blog.Blog blog)
		{
			 return BlogHandler.AddBlog(blog);
		}

		public virtual void UpdateBlog(EPiServer.Community.Blog.Blog blog)
		{
			 BlogHandler.UpdateBlog(blog);
		}

		public virtual void RemoveBlog(EPiServer.Community.Blog.Blog blog)
		{
			 BlogHandler.RemoveBlog(blog);
		}

		public virtual EPiServer.Community.Blog.Entry GetEntry(System.Int32 id)
		{
			 return BlogHandler.GetEntry(id);
		}

		public virtual void UpdateEntryCommentsAsRead(EPiServer.Community.Blog.Entry entry)
		{
			 BlogHandler.UpdateEntryCommentsAsRead(entry);
		}

		public virtual void AddEntryVisit(EPiServer.Community.Blog.Entry entry)
		{
			 BlogHandler.AddEntryVisit(entry);
		}

		public virtual EPiServer.Community.Blog.EntryVisit GetEntryVisit(EPiServer.Community.Blog.Entry entry)
		{
			 return BlogHandler.GetEntryVisit(entry);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, fromDate, toDate, publishState, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, fromDate, toDate, publishState, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Boolean byPublishDate, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, fromDate, toDate, publishState, byPublishDate, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.Blog blog, EPiServer.Community.Blog.ReadStatus readStatus, EPiServer.Common.Security.IUser user, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Boolean byPublishDate, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blog, readStatus, user, fromDate, toDate, publishState, byPublishDate, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, fromDate, toDate, publishState, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, fromDate, toDate, publishState, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntriesByPublishDate(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntriesByPublishDate(blogType, fromDate, toDate, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntriesByPublishDate(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntriesByPublishDate(blogType, fromDate, toDate, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Boolean byPublicationDate, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, fromDate, toDate, publishState, byPublicationDate, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetEntries(EPiServer.Community.Blog.BlogType blogType, System.DateTime fromDate, System.DateTime toDate, EPiServer.Community.Blog.EntryPublishState publishState, System.Boolean byPublicationDate, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntrySortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntries(blogType, fromDate, toDate, publishState, byPublicationDate, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.Entry AddEntry(EPiServer.Community.Blog.Entry entry)
		{
			 return BlogHandler.AddEntry(entry);
		}

		public virtual void UpdateEntry(EPiServer.Community.Blog.Entry entry)
		{
			 BlogHandler.UpdateEntry(entry);
		}

		public virtual void RemoveEntry(EPiServer.Community.Blog.Entry entry)
		{
			 BlogHandler.RemoveEntry(entry);
		}

		public virtual void SetBlogLastReadDate(EPiServer.Common.Security.IUser user, EPiServer.Community.Blog.Blog blog)
		{
			 BlogHandler.SetBlogLastReadDate(user, blog);
		}

		public virtual EPiServer.Community.Blog.EntryComment AddEntryComment(EPiServer.Community.Blog.EntryComment entryComment)
		{
			 return BlogHandler.AddEntryComment(entryComment);
		}

		public virtual void UpdateEntryComment(EPiServer.Community.Blog.EntryComment entryComment)
		{
			 BlogHandler.UpdateEntryComment(entryComment);
		}

		public virtual void RemoveEntryComment(EPiServer.Community.Blog.EntryComment entryComment)
		{
			 BlogHandler.RemoveEntryComment(entryComment);
		}

		public virtual EPiServer.Community.Blog.EntryComment GetEntryComment(System.Int32 id)
		{
			 return BlogHandler.GetEntryComment(id);
		}

		public virtual EPiServer.Community.Blog.EntryCommentCollection GetEntryComments(EPiServer.Community.Blog.Entry entry, System.Int32 page, System.Int32 pageSize, EPiServer.Community.Blog.EntryCommentSortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntryComments(entry, page, pageSize, sortOrder);
		}

		public virtual EPiServer.Community.Blog.EntryCommentCollection GetEntryComments(EPiServer.Community.Blog.Entry entry, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems, EPiServer.Community.Blog.EntryCommentSortOrder[] sortOrder)
		{
			 return BlogHandler.GetEntryComments(entry, page, pageSize, out totalItems, sortOrder);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetQueryResult(EPiServer.Community.Blog.Queries.BlogQuery query)
		{
			 return BlogHandler.GetQueryResult(query);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetQueryResult(EPiServer.Community.Blog.Queries.BlogQuery query, System.Int32 page, System.Int32 pageSize)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize);
		}

		public virtual EPiServer.Community.Blog.BlogCollection GetQueryResult(EPiServer.Community.Blog.Queries.BlogQuery query, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize, out totalItems);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryQuery query)
		{
			 return BlogHandler.GetQueryResult(query);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryQuery query, System.Int32 page, System.Int32 pageSize)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize);
		}

		public virtual EPiServer.Community.Blog.EntryCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryQuery query, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize, out totalItems);
		}

		public virtual EPiServer.Community.Blog.EntryCommentCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryCommentQuery query)
		{
			 return BlogHandler.GetQueryResult(query);
		}

		public virtual EPiServer.Community.Blog.EntryCommentCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryCommentQuery query, System.Int32 page, System.Int32 pageSize)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize);
		}

		public virtual EPiServer.Community.Blog.EntryCommentCollection GetQueryResult(EPiServer.Community.Blog.Queries.EntryCommentQuery query, System.Int32 page, System.Int32 pageSize, out System.Int32 totalItems)
		{
			 return BlogHandler.GetQueryResult(query, page, pageSize, out totalItems);
		}

		private static BlogHandlerFacade _instance;

		public static BlogHandlerFacade Instance
		{
			get
			{
				if(_instance == null)
					_instance = new BlogHandlerFacade();

				return _instance;
			}

			set
			{
				_instance = value;
			}
		}

	}
}